package hc.bre.rest.cmn

import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder
import com.fasterxml.jackson.databind.DeserializationFeature
import com.fasterxml.jackson.databind.SerializationFeature;
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration;

@Configuration
class JacksonJsonMapperConfig {
	@Bean
	Jackson2ObjectMapperBuilderCustomizer  jackson2ObjectMapperBuilderCustomizer(){
		return new Jackson2ObjectMapperBuilderCustomizer() {
					@Override
					public void customize(Jackson2ObjectMapperBuilder jacksonObjectMapperBuilder) {
						jacksonObjectMapperBuilder.featuresToDisable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
					}
				};
	}
	
}
